<template>
	<view class="item">
		<view class="bg-white press-down-active" style="padding: 5px 10px; margin-bottom: 10px; border-radius: 4px;" @click="goFeedbackInfo">
			<view class="Media">
				<view class="Media-body text-xs" style="padding: 0 10px;">
					<view class="Grid">
						<view style="margin-bottom: 10px;">{{getType()}}</view>
						<view class="Grid-cell text-right">{{info.status_name}}</view>
					</view>
					<view class="Grid">
						<view>{{info.create_time}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from "vuex";
	
	export default {
		name: 'item',
		props: {
			info: {
				type: Object,
				default: () => ({})
			}
		},
		computed: {
			...mapState({
				userInfo: state => state.login.userInfo
			}),
		},
		data() {
			return {
				status: {
					1: '已关注',
					2: '已取关',
					3: '已拉黑'
				}
			}
		},
		methods: {
			getType() {
				return this.info.type == 1 ? '投诉': '其他'
			},
			goFeedbackInfo() {
				uni.navigateTo({
					url: `/pages/user/feedbackInfo/feedbackInfo?appid=${this.userInfo.appid}&id=${this.info.feedback_id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item {
		padding: 0 10px;
	}
</style>